package cn.tianjindong.blog.mapper;

import cn.tianjindong.blog.pojo.BlogManagerVisitlog;
import cn.tianjindong.blog.pojo.BlogManagerVisitlogExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface BlogManagerVisitlogMapper {
    int countByExample(BlogManagerVisitlogExample example);

    int deleteByExample(BlogManagerVisitlogExample example);

    int deleteByPrimaryKey(Long id);

    int insert(BlogManagerVisitlog record);

    int insertSelective(BlogManagerVisitlog record);
    
    /**
     * 分页查询，结果按照时间排序
     * @param startIndex 从第几条开始
     * @param countItem 查询几条
     * @return
     */
    List<BlogManagerVisitlog> getLimitList(int startIndex,int countItem);
    
    /**
     * 获取此次登录之前最后一次成功的登录记录
     * @return
     */
    BlogManagerVisitlog getLastVisitLog();

    List<BlogManagerVisitlog> selectByExample(BlogManagerVisitlogExample example);

    BlogManagerVisitlog selectByPrimaryKey(Long id);

    int updateByExampleSelective(@Param("record") BlogManagerVisitlog record, @Param("example") BlogManagerVisitlogExample example);

    int updateByExample(@Param("record") BlogManagerVisitlog record, @Param("example") BlogManagerVisitlogExample example);

    int updateByPrimaryKeySelective(BlogManagerVisitlog record);

    int updateByPrimaryKey(BlogManagerVisitlog record);
}